#include "ReadLog.h"
#include <QDir>
ReadLog::ReadLog(QObject *parent)
	: QThread(parent)
{
	readB = true;
}

ReadLog::~ReadLog()
{
}

void ReadLog::run()
{
	while (readB)
	{
		QFile file(LogPath);
		if (!file.open(QIODevice::ReadOnly)) {
		}
		QByteArray t = file.readAll();
		QString BufferString = QString::fromLocal8Bit(t);
		if (BufferString != TxtString)
		{
			TxtString = BufferString;
			emit SeedLog(QString::fromLocal8Bit(BufferString.toStdString().c_str()));
		}

	}
}
